package com.hmall.search.web;



import com.hmall.common.dto.PageDTO;
import com.hmall.search.pojo.RequestDTO;
import com.hmall.search.service.ISearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
@RequestMapping("search")
public class SearchController {

    @Autowired
    ISearchService searchService;

    @PostMapping("/list")
    public PageDTO list(@RequestBody RequestDTO requestDTO) throws IOException {
        return searchService.search(requestDTO);
    }
}
